package com.fmdj.bff.driver.service.impl;


import com.fmdj.bff.driver.controller.form.ClearNewOrderQueueForm;
import com.fmdj.bff.driver.controller.form.ReceiveNewOrderMessageForm;
import com.fmdj.bff.driver.controller.form.SendPrivateMessageForm;
import com.fmdj.bff.driver.feign.SnmServiceApi;
import com.fmdj.bff.driver.service.NewOrderMessageService;
import com.fmdj.common.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class NewOrderMessageServiceImpl implements NewOrderMessageService {

    @Autowired
    private SnmServiceApi snmServiceApi;


    @Override
    public void clearNewOrderQueue(ClearNewOrderQueueForm form) {
        snmServiceApi.clearNewOrderQueue(form);
    }

    @Override
    public ArrayList receiveNewOrderMessage(ReceiveNewOrderMessageForm form) {
        CommonResult commonResult = snmServiceApi.receiveNewOrderMessage(form);
        ArrayList list = (ArrayList) commonResult.get(CommonResult.RETURN_RESULT);
        return list;
    }

    @Override
    public void sendPrivateMessage(SendPrivateMessageForm form) {

    }

    @Override
    public void sendPrivateMessageAsync(SendPrivateMessageForm form) {

    }
}
